<html>
<head><meta charset="utf-8"><title>RFC 2580: pointer metadata · t-lang · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/index.html">t-lang</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/RFC.202580.3A.20pointer.20metadata.html">RFC 2580: pointer metadata</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="213845783"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/RFC%202580%3A%20pointer%20metadata/near/213845783" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/RFC.202580.3A.20pointer.20metadata.html#213845783">(Oct 19 2020 at 21:04)</a>:</h4>
<p>I have a branch that implements the <code>Pointee</code> trait as a special case in the compiler similar to <code>DiscriminantKind</code>. So at this point I think what’s left to do for <a href="https://github.com/rust-lang/rfcs/pull/2580">RFC 2580</a> is mostly some design polish and a lang team decision</p>



<a name="222506786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/RFC%202580%3A%20pointer%20metadata/near/222506786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/RFC.202580.3A.20pointer.20metadata.html#222506786">(Jan 12 2021 at 22:45)</a>:</h4>
<p>Hi lang team. Friendly ping for <span class="user-mention" data-user-id="116009">@nikomatsakis</span> to mark a concern as resolved and <span class="user-mention" data-user-id="127859">@Taylor Cramer</span> <span class="user-mention" data-user-id="116083">@pnkfelix</span> <span class="user-mention" data-user-id="256759">@boats</span> for checkboxes in <a href="https://github.com/rust-lang/rfcs/pull/2580#issuecomment-722398370">https://github.com/rust-lang/rfcs/pull/2580#issuecomment-722398370</a></p>



<a name="222520975"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/RFC%202580%3A%20pointer%20metadata/near/222520975" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/RFC.202580.3A.20pointer.20metadata.html#222520975">(Jan 13 2021 at 01:35)</a>:</h4>
<p><span class="user-mention" data-user-id="219747">@Simon Sapin</span> done -- although we should definitely note the soundness point that was raised...somewhere...</p>



<a name="222521030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/RFC%202580%3A%20pointer%20metadata/near/222521030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/RFC.202580.3A.20pointer.20metadata.html#222521030">(Jan 13 2021 at 01:36)</a>:</h4>
<p><a href="https://github.com/rust-lang/rfcs/pull/2580#issuecomment-722645176">this point</a>, in particular</p>



<a name="222546759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/RFC%202580%3A%20pointer%20metadata/near/222546759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/RFC.202580.3A.20pointer.20metadata.html#222546759">(Jan 13 2021 at 08:07)</a>:</h4>
<p>I can copy-paste this comment in a new issue but I don’t really understand it so I don’t know how to summarize in the title</p>



<a name="222546768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/RFC%202580%3A%20pointer%20metadata/near/222546768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/RFC.202580.3A.20pointer.20metadata.html#222546768">(Jan 13 2021 at 08:07)</a>:</h4>
<p>Is this only a problem with specialization?</p>



<a name="222554793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/RFC%202580%3A%20pointer%20metadata/near/222554793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ashley Mannix <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/RFC.202580.3A.20pointer.20metadata.html#222554793">(Jan 13 2021 at 09:32)</a>:</h4>
<p>I _think_ it’s a problem with covariance in general, where <code>&amp;'a T</code> and <code>*const T</code> are covariant over <code>T</code>, so the type you get from <code>T::Metadata</code> could change as <code>T</code> does, but there’s an invariant that the metadata must remain valid between coerced values that needs to be uphold somehow? There’s actually no specialization needed to add impls for the example using <code>for&lt;'a&gt; fn(&amp;'a Type)</code> and <code>fn(&amp;'static Type)</code>, because they’re distinct concrete types</p>



<a name="222598721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/RFC%202580%3A%20pointer%20metadata/near/222598721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/RFC.202580.3A.20pointer.20metadata.html#222598721">(Jan 13 2021 at 15:37)</a>:</h4>
<p>It's not related to specialization</p>



<a name="222598778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/RFC%202580%3A%20pointer%20metadata/near/222598778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/RFC.202580.3A.20pointer.20metadata.html#222598778">(Jan 13 2021 at 15:37)</a>:</h4>
<p>I can add it somewhere, I imagine it belongs in the tracking issue for custom DST</p>



<a name="222598798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/RFC%202580%3A%20pointer%20metadata/near/222598798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/RFC.202580.3A.20pointer.20metadata.html#222598798">(Jan 13 2021 at 15:37)</a>:</h4>
<p>we need to make a "lang team notes" section on that I think</p>



<a name="224295342"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/RFC%202580%3A%20pointer%20metadata/near/224295342" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/RFC.202580.3A.20pointer.20metadata.html#224295342">(Jan 28 2021 at 08:15)</a>:</h4>
<p>Hello again. FCP has completed: <a href="https://github.com/rust-lang/rfcs/pull/2580#issuecomment-765812361">https://github.com/rust-lang/rfcs/pull/2580#issuecomment-765812361</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>